-- ----------------------- SUMMERY ------------------------- --
-- this lua file contains all 'system' side config of neovim --
-- --------------------------------------------------------- --


-- ---------------------- --
-- neovim global settings --

vim.cmd("set expandtab")
vim.cmd("set tabstop=4")
vim.cmd("set softtabstop=4")
vim.cmd("set shiftwidth=4")
vim.cmd("set nu")
vim.cmd("set relativenumber")
vim.opt.termguicolors = true
vim.opt.wrap = false
vim.opt.sidescroll = 1
vim.opt.showmode = false

-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " " -- define whitch key is 'leader' key
vim.g.maplocalleader = "\\"
-- ---------------------- --


-- -------------------- --
-- line number settings --

vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = 'white', bg = '' })
vim.opt.cursorline = true  -- 启用当前行高亮
-- -------------------- --


-- ------------------------------------ -- 
-- connect neovim register to clipboard -- 

vim.opt.clipboard:append("unnamedplus")
vim.g.clipboard = {
  name = "wl-clipboard",
  copy = {
    ["+"] = { "wl-copy", "--type", "text/plain" },
    ["*"] = { "wl-copy", "--type", "text/plain" },
  },
  paste = {
    ["+"] = { "wl-paste", "--no-newline" },
    ["*"] = { "wl-paste", "--no-newline" },
  },
}
-- ------------------------------------ -- 
